package com.example.barcodeapp.ui.own.fragment;

import android.widget.Toast;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.example.barcodeapp.R;
import com.example.barcodeapp.adapter.KeChengXiangQingAdapter;
import com.example.barcodeapp.adapter.XiangQingZhiBoKe;
import com.example.barcodeapp.base.BaseFragment;
import com.example.barcodeapp.interfaces.IBasePersenter;
import com.example.barcodeapp.persenter.OnePresenterKeChengXiangQing;

import butterknife.BindView;


public class KeChengMuLuZhiBoFragment extends BaseFragment {


    @BindView(R.id.xilei_rv)
    RecyclerView xileiRv;

    @Override
    protected int getLayout() {
        return R.layout.fragment_ke_cheng_mu_lu_zhi_bo;
    }

    @Override
    protected void initView() {
        XiangQingZhiBoKe adapterMianFei = new XiangQingZhiBoKe(getActivity());
        adapterMianFei.setClick(new XiangQingZhiBoKe.IClick() {
            @Override
            public void click(int pos) {
                Toast.makeText(getActivity(), pos+"", Toast.LENGTH_SHORT).show();
            }
        });
        LinearLayoutManager manager3 = new LinearLayoutManager(context);
        xileiRv.setLayoutManager(manager3);
        xileiRv.setAdapter(adapterMianFei);
    }

    @Override
    protected OnePresenterKeChengXiangQing initPersenter() {
        return new OnePresenterKeChengXiangQing();
    }

    @Override
    protected void initData() {

    }
}